Skip to content

Feature/compound assignments +semver:feature#247

Merged
Stepami merged 20 commits into
masterfrom
feature/compound-assignments
May 22, 2026
Merged

Feature/compound assignments +semver:feature#247
Stepami merged 20 commits into
masterfrom
feature/compound-assignments

Conversation

@Stepami
Copy link
Copy Markdown
Owner

@Stepami Stepami commented May 22, 2026

Describe the solution you've done

  • развёртывание выражений вида x += 1 => x = x + 1
  • тесты
  • рефакторинги: MemberExpression, nullable AST node Parent, Empty Scope

Related Issues
Closes #233

Минин Степан Александрович added 20 commits May 20, 2026 18:39
Split `TopDownParser` into separate files for better modularity and
maintainability. Added implementations for expressions, declarations,
and statements handling.
update grammar rules for assignment and cast expressions

Refined `AssignmentExpression` grammar to include optional "Operator"
and updated `CastExpression` to support dynamic `TypeValue`.
Added validation to throw `ParserException` when no `:` or `=` follows
an argument name
simplify expression parsing logic

Allow end call expr list with comma
replace `LeftHandSideExpression` with `MemberExpression` in
`AssignmentExpression` and related grammar adjustments
simplify declaration parsing logic

Replaced `AddToDeclaration` with `DeclarationAssignmentExpression`

Prohibited undefined vars like `let x` grammar-wise
- Replaced null returns with `ParserException` for better error handling
- Extracted `CurrentIsStatement` for cleaner parsing logic
- Updated grammar to improve clarity on `MemberExpression`

Closes #233
Specify value of expected tokens for certain types
- Updated `TokenTypes` to separate `Assign` and `Operator` patterns,
improving token categorization.
- Added `Distinct()` to `TokenTypesProvider` for unique token handling.
- Adjusted `GeneratedRegexContainer` to include `ExplicitCapture` for
better regex performance.

Closes #233
Standardized null safety for parent scopes across AST nodes, replacing direct access with conditional checks and fallback to `Scope.Empty`.
Desugar Compound Assignment

Closes #233
Leave Expression the only cloning nodes
@github-actions
Copy link
Copy Markdown

File Coverage Branches Missing
All files 83% 74%

Minimum allowed coverage is 80%

Generated by 🐒 cobertura-action against bbe2292

@Stepami Stepami changed the title Feature/compound assignments Feature/compound assignments +semver:feature May 22, 2026
@Stepami Stepami merged commit cfe822c into master May 22, 2026
3 checks passed
@Stepami Stepami deleted the feature/compound-assignments branch May 22, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] compound assignments

1 participant